<template>
  <div>
    <LifeCycle v-if="isshow"></LifeCycle>
    <button @click="remove">销毁组件</button>
  </div>
</template>

<script>
import LifeCycle from "@/components/生命周期/lifeCycle.vue";
export default {
  components: {
    LifeCycle,
  },
  data() {
    return {
      isshow: true,
    };
  },
  methods:{
    remove(){
      this.isshow = false;
    }
  }
};
</script>

<style></style>
